home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
081-090
/
amok81
/
m2
/
talkdemo
/
txt
/
talkgadgets.mod
< prev
next >
Wrap
Text File
|
1993-11-04
|
18KB
|
742 lines
IMPLEMENTATION MODULE TalkGadgets;
(*$ LargeVars:=FALSE StackParms:=FALSE Volatile:=FALSE *)
FROM SYSTEM IMPORT ADR,ADDRESS,CAST,TAG;
FROM UtilityD IMPORT tagEnd;
FROM Requester IMPORT OKRequest;
IMPORT TB:TalkBase,
A:Arts,
ID:IntuitionD,
IL:IntuitionL,
GD:GadToolsD,
GL:GadToolsL,
N:Narrator,
TN:TalkNarrator;
TYPE
MyNewGadget=RECORD
type:LONGCARD;
ng:GD.NewGadget;
tags:ADDRESS;
END;
MyTag18=ARRAY[0..16] OF ADDRESS;
MyTag6=ARRAY[0..6] OF ADDRESS;
MyTag4=ARRAY[0..4] OF ADDRESS;
MyTag2=ARRAY[0..2] OF ADDRESS;
MyTag0=ARRAY[0..0] OF ADDRESS;
GArr=ARRAY Gadgets OF MyNewGadget;
Str127=ARRAY[0..127] OF CHAR;
Str255=ARRAY[0..255] OF CHAR;
Str127Ptr=POINTER TO Str127;
Str255Ptr=POINTER TO Str255;
VAR
(* GADGETS ****************************************** *)
TYPE
AA4=ARRAY[0..3] OF ADDRESS;
AA3=ARRAY[0..2] OF ADDRESS;
AA12=ARRAY[0..11] OF ADDRESS;
CONST
ld4="%5ld";
modeLabs=AA4{ADR("Natural"),ADR("Robotic"),ADR("Manual"),NIL};
sexLabs=AA3{ADR("Male"),ADR("Female"),NIL};
centLabs=AA12{ (* noch mal als Konstante, damit reentrant! *)
ADR("IY"),
ADR("IH"),
ADR("EH"),
ADR("AE"),
ADR("AA"),
ADR("AH"),
ADR("AO"),
ADR("OW"),
ADR("UH"),
ADR("ER"),
ADR("UW"),
NIL};
VAR
tagBuff:ARRAY[0..5] OF ADDRESS;
glist,gad:ID.GadgetPtr;
(*$ RangeChk:=FALSE *)
ngs:=GArr{
(* rate *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:150,
topEdge:10,
width:150,
height:15,
gadgetText:ADR("rate: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), N.minRate,
ORD(GD.gtslMax), N.maxRate,
ORD(GD.gtslLevel), N.defRate,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* pitch *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:150,
topEdge:25,
width:150,
height:15,
gadgetText:ADR("pitch: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), N.minPitch,
ORD(GD.gtslMax), N.maxPitch,
ORD(GD.gtslLevel), N.defPitch,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* volume *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:150,
topEdge:40,
width:150,
height:15,
gadgetText:ADR("volume: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), N.minVol,
ORD(GD.gtslMax), N.maxVol,
ORD(GD.gtslLevel), N.defVol,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* sampFreq *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:150,
topEdge:55,
width:150,
height:15,
gadgetText:ADR("sampFreq: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), N.minFreq,
ORD(GD.gtslMax), N.maxFreq,
ORD(GD.gtslLevel), N.defFreq,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* f0Enth *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:450,
topEdge:10,
width:150,
height:15,
gadgetText:ADR("f0Enth: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), 0,
ORD(GD.gtslMax), 255,
ORD(GD.gtslLevel), N.defF0Enthus,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* f0Perturb *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:450,
topEdge:25,
width:150,
height:15,
gadgetText:ADR("f0Perturb: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), 0,
ORD(GD.gtslMax), 255,
ORD(GD.gtslLevel), N.defF0Pert,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* f1Adj *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:450,
topEdge:40,
width:150,
height:15,
gadgetText:ADR("f1Adj: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), -128,
ORD(GD.gtslMax), 104, (* bei mehr ist nichts mehr zu hören, 120 kommt nie zurück! *)
ORD(GD.gtslLevel), 0,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* f2Adj *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:450,
topEdge:55,
width:150,
height:15,
gadgetText:ADR("f2Adj: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), -128,
ORD(GD.gtslMax), 127,
ORD(GD.gtslLevel), 0,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* f3Adj *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:450,
topEdge:70,
width:150,
height:15,
gadgetText:ADR("f3Adj: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), -128,
ORD(GD.gtslMax), 127,
ORD(GD.gtslLevel), 0,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* a1Adj *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:450,
topEdge:85,
width:150,
height:15,
gadgetText:ADR("a1Adj: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), -128,
ORD(GD.gtslMax), 127,
ORD(GD.gtslLevel), 0,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* a2Adj *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:450,
topEdge:100,
width:150,
height:15,
gadgetText:ADR("a2Adj: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), -128,
ORD(GD.gtslMax), 127,
ORD(GD.gtslLevel), 0,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* a3Adj *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:450,
topEdge:115,
width:150,
height:15,
gadgetText:ADR("a3Adj: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), -128,
ORD(GD.gtslMax), 127,
ORD(GD.gtslLevel), 0,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* articulate *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:150,
topEdge:70,
width:150,
height:15,
gadgetText:ADR("articulate: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), 0,
ORD(GD.gtslMax), 255,
ORD(GD.gtslLevel), N.defArtic,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* avBias *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:150,
topEdge:85,
width:150,
height:15,
gadgetText:ADR("avBias: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), -128,
ORD(GD.gtslMax), 127,
ORD(GD.gtslLevel), 0,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* afBias *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:150,
topEdge:100,
width:150,
height:15,
gadgetText:ADR("afBias: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), -128,
ORD(GD.gtslMax), 127,
ORD(GD.gtslLevel), 0,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* priority *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:150,
topEdge:115,
width:150,
height:15,
gadgetText:ADR("priority: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), -128,
ORD(GD.gtslMax), 127,
ORD(GD.gtslLevel), N.defPriority,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* centralize *)
MyNewGadget{
type:GD.sliderKind,
ng:GD.NewGadget{
leftEdge:150,
topEdge:130,
width:150,
height:15,
gadgetText:ADR("centralize: "),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag18{
ORD(GD.gtslMin), N.minCent,
ORD(GD.gtslMax), N.maxCent,
ORD(GD.gtslLevel), N.defCentral,
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(GD.gtslMaxLevelLen),5, (* Length of Text *)
ORD(GD.gtslLevelFormat),ADR(ld4),
ORD(ID.gaRelVerify), ORD(TRUE),
ORD(ID.pgaFreedom), ORD(ID.lorientHoriz),
tagEnd})
},
(* mode *)
MyNewGadget{
type:GD.mxKind,
ng:GD.NewGadget{
leftEdge:80,
topEdge:155,
width:80,
height:15,
gadgetText:ADR("mode:"),
flags:GD.NewGadgetFlagSet{GD.placetextLeft}
},
tags:ADR(MyTag2{
ORD(GD.gtmxLabels), ADR(modeLabs),
tagEnd})
},
(* sex *)
MyNewGadget{
type:GD.mxKind,
ng:GD.NewGadget{
leftEdge:100,
topEdge:155,
width:80,
height:15,
gadgetText:ADR("sex:"),
flags:GD.NewGadgetFlagSet{GD.placetextRight}
},
tags:ADR(MyTag2{
ORD(GD.gtmxLabels), ADR(sexLabs),
tagEnd})
},
(* centphon *)
MyNewGadget{
type:GD.cycleKind,
ng:GD.NewGadget{
leftEdge:310,
topEdge:130,
width:80,
height:15,
gadgetText:ADR("centphon"),
flags:GD.NewGadgetFlagSet{GD.placetextRight}
},
tags:ADR(MyTag2{
ORD(GD.gtcyLabels), ADR(centLabs), (* TB.centLabs verhindert reentrancy! *)
tagEnd})
},
(* text *)
MyNewGadget{
type:GD.stringKind,
ng:GD.NewGadget{
leftEdge:0,
topEdge:200,
width:640,
height:15,
gadgetText:ADR("Text"),
flags:GD.NewGadgetFlagSet{GD.placetextAbove}
},
tags:ADR(MyTag6{
ORD(ID.gaLabelImage)+1, ORD(FALSE), (* no TabCycle! *)
ORD(GD.gtstMaxChars), SIZE(TB.textBuff),
ORD(GD.gtstString), ADR("Hello, welcome to Talker - Version 1.1. - Enjoy it!"),
tagEnd})
},
(* phonemes *)
MyNewGadget{
type:GD.stringKind,
ng:GD.NewGadget{
leftEdge:0,
topEdge:230,
width:640,
height:15,
gadgetText:ADR("Phonemes"),
flags:GD.NewGadgetFlagSet{GD.placetextAbove}
},
tags:ADR(MyTag4{
ORD(ID.gaLabelImage)+1, ORD(FALSE), (* ID.gaTabCycle in V37 *)
ORD(GD.gtstMaxChars), SIZE(TB.phonBuff),
tagEnd})
},
(* talk *)
MyNewGadget{
type:GD.buttonKind,
ng:GD.NewGadget{
leftEdge:230,
topEdge:155,
width:80,
height:15,
gadgetText:ADR(">>TALK<<"),
flags:GD.NewGadgetFlagSet{(*GD.placetextBelow,*)GD.ngHighlabel}
},
tags:ADR(MyTag0{tagEnd})
},
(* abort *)
MyNewGadget{
type:GD.buttonKind,
ng:GD.NewGadget{
leftEdge:320,
topEdge:155,
width:60,
height:15,
gadgetText:ADR("Abort"),
flags:GD.NewGadgetFlagSet{GD.placetextIn,GD.ngHighlabel}
},
tags:ADR(MyTag0{tagEnd})
},
};
(*$ POP RangeChk *)
PROCEDURE MakeGadgets():BOOLEAN;
VAR
ga:Gadgets;
BEGIN
gad:=glist;
FOR ga:=MIN(Gadgets) TO MAX(Gadgets) DO
WITH ngs[ga] DO
ng.textAttr:=TB.myTextAttr;
ng.visualInfo:=TB.vi;
ng.gadgetID:=ORD(ga);
gad:=GL.CreateGadgetA(type,gad^,ng,tags);
gadgets[ga]:=gad;
IF gad=NIL THEN RETURN FALSE END;
END;
END;
IF IL.AddGList(TB.myWindow,glist,-1,-1,NIL)=0 THEN END;
IL.RefreshGList(glist,TB.myWindow,NIL,-1);
GL.GTRefreshWindow(TB.myWindow,NIL);
RETURN TRUE
END MakeGadgets;
PROCEDURE InitGadgets();
BEGIN
glist:=NIL;
IF GL.CreateContext(glist)=NIL THEN
HALT
END;
IF ~MakeGadgets() THEN
TB.SetBusy(TRUE);
OKRequest("Kann Gadgets nicht erzeugen!");
TB.SetBusy(FALSE);
END;
GL.DrawBevelBoxA(TB.myRp,TB.midX-100,TB.midY-20,200,40,TAG(tagBuff,
GD.gtVisualInfo, TB.vi,
GD.gtbbRecessed, TRUE,
tagEnd));
END InitGadgets;
(* VAR-Parameter geht nicht, weil sonst für TAG zu wenig Register! *)
PROCEDURE SetNarr(n:TB.NarrData);
BEGIN
(* 1.: Werte kopieren *)
TB.myNarr:=n;
(* 2. Gadgets update *)
(*$ Volatile:=TRUE *)
GL.GTSetGadgetAttrsA(gadgets[rate],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.rate,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[pitch],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.pitch,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[volume],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.volume,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[sampFreq],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.sampFreq,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[f0Enth],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.f0Enthusiasm,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[f0Perturb],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.f0Perturb,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[f1Adj],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.f1Adj,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[f2Adj],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.f2Adj,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[f3Adj],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.f3Adj,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[a1Adj],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.a1Adj,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[a2Adj],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.a2Adj,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[a3Adj],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.a3Adj,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[articulate],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.articulate,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[avBias],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.avBias,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[afBias],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.afBias,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[priority],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.priority,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[centralize],TB.myWindow,NIL,TAG(tagBuff,
GD.gtslLevel, n.centralize,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[mode],TB.myWindow,NIL,TAG(tagBuff,
GD.gtmxActive, n.mode,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[sex],TB.myWindow,NIL,TAG(tagBuff,
GD.gtmxActive, n.sex,
tagEnd));
GL.GTSetGadgetAttrsA(gadgets[centphon],TB.myWindow,NIL,TAG(tagBuff,
GD.gtcyActive, n.centphon,
ID.gaDisabled, n.centralize=0,
tagEnd));
(*$ POP Volatile *)
END SetNarr;
PROCEDURE UpdatePhonemes;
(* Sorry, aber das verhindert reentrancy!
CONST
phonBuffAdr=ADR(TB.phonBuff); (* Dies geht erst ab V4.1!!!! *)
*)
VAR
phonBuffAdr:ADDRESS; (* für TAG zu wenig Register! *)
BEGIN
phonBuffAdr:=ADR(TB.phonBuff);
GL.GTSetGadgetAttrsA(gadgets[phonemes],TB.myWindow,NIL,TAG(tagBuff,
GD.gtstString, phonBuffAdr,
tagEnd));
END UpdatePhonemes;
PROCEDURE SetCentPhone(nr:TB.CentrPhons);
VAR
c0:BOOLEAN;
BEGIN
TB.myNarr.centphon:=nr;
c0:=TB.myNarr.centralize=0;
GL.GTSetGadgetAttrsA(gadgets[centphon],TB.myWindow,NIL,TAG(tagBuff,
GD.gtcyActive, nr,
ID.gaDisabled, c0,
tagEnd));
END SetCentPhone;
PROCEDURE Disable(g:Gadgets);
BEGIN
IF ~(ID.gadgDisabled IN gadgets[g]^.flags) THEN
GL.GTSetGadgetAttrsA(gadgets[g],TB.myWindow,NIL,TAG(tagBuff,
ID.gaDisabled, TRUE,
tagEnd));
END;
END Disable;
PROCEDURE Enable(g:Gadgets);
BEGIN
IF (ID.gadgDisabled IN gadgets[g]^.flags) THEN
GL.GTSetGadgetAttrsA(gadgets[g],TB.myWindow,NIL,TAG(tagBuff,
ID.gaDisabled, FALSE,
tagEnd));
END;
END Enable;
PROCEDURE DisposeGadgets();
BEGIN
IF glist#NIL THEN
GL.FreeGadgets(glist);
glist:=NIL
END;
END DisposeGadgets;
BEGIN
A.Assert(A.kickVersion>=37,ADR("Needs kick>=37"));
InitGadgets;
CLOSE
DisposeGadgets;
END TalkGadgets.mod